package service

import (
	"go-zero-demo/distributed-id-rpc/internal/dao/entity"
	"gorm.io/gorm"
)

type (
	Segment interface {
		CreateTag(*entity.Segments) error
		GetId(string) (int64, error)
		SnowFlakeGetId() int64
	}

	SegmentRepo interface {
		GetList(db *gorm.DB) ([]entity.Segments, error)
		GetNextId(db *gorm.DB, tag string) (*entity.Segments, error)
		Add(db *gorm.DB, s *entity.Segments) error
	}
)
